home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
UTILREEN
/
LPTX.LZH
/
REDIRPRN.ZIP
/
REDIRPRN.DOC
Wrap
Text File
|
1986-05-13
|
2KB
|
34 lines
Redirect Printer Output
John Axline/Los Angeles
This program redirects output which was intended to go to the printer, and
instead writes it to a file (or any other device to which DOS can do I/O).
The file can then be examined or modified (if you have tools appropriate to
the job), and of course can be printed when desired simply by doing a COPY
from the file to PRN:
It can be used with any program that will run under DOS 2 or 3 so long as the
program accesses the printer using the normal DOS functions or the BIOS
routines (INT 17h).
It requires DOS 2.0 or later, and about 10K more memory than your program
normally uses.
This program applies redirection to the "standard printer device" handle,
which is 4, using DOS function 46h, "force a duplicate of a handle". This
program runs your program as a child process; the child inherits any redirection
the parent has invoked.
Invoke the process as follows:
REDIRPRN <yourjob.exe> <savefile.out> <any arguments yourjob wants>
If you forget, invoke the program without arguments and it will remind you.
This program was originally written to capture the output of a popular font
generator program that supports only a few printers, so it could be passed
through a filter program to an unsupported printer.
The source is for DeSmet's C-Ware compiler, with thanks as usual to those fine
folks.